<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow-IPC: ipc::transport::sync_io::Native_handle_sender Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow-IPC<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow-IPC project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceipc.html">ipc</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1transport.html">transport</a></li><li class="navelem"><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html">sync_io</a></li><li class="navelem"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">ipc::transport::sync_io::Native_handle_sender Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>A documentation-only <em>concept</em> defining the behavior of an object that is the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern counterpart of the async-I/O-pattern-following concept of the same name in our parent namespace: <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.  
 <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="sync__io_2native__handle__transport_8hpp_source.html">native_handle_transport.hpp</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for ipc::transport::sync_io::Native_handle_sender:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender__coll__graph.svg" width="356" height="372"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a935bfba8ac18f395eb920224395cbc8f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a935bfba8ac18f395eb920224395cbc8f">Native_handle_sender</a> ()</td></tr>
<tr class="memdesc:a935bfba8ac18f395eb920224395cbc8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default ctor: Creates a peer object in NULL (neither connected nor connecting) state.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a935bfba8ac18f395eb920224395cbc8f">More...</a><br /></td></tr>
<tr class="separator:a935bfba8ac18f395eb920224395cbc8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa99ee4ded3b81cbaea9cb7aeac52a896"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#aa99ee4ded3b81cbaea9cb7aeac52a896">Native_handle_sender</a> (<a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aa99ee4ded3b81cbaea9cb7aeac52a896"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-constructs from <code>src</code>; <code>src</code> becomes as-if default-cted (therefore in NULL state).  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#aa99ee4ded3b81cbaea9cb7aeac52a896">More...</a><br /></td></tr>
<tr class="separator:aa99ee4ded3b81cbaea9cb7aeac52a896"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3efe9a668e251175e5e199e99f9257d"><td class="memItemLeft" align="right" valign="top"><a id="af3efe9a668e251175e5e199e99f9257d" name="af3efe9a668e251175e5e199e99f9257d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Native_handle_sender</b> (const <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;)=delete</td></tr>
<tr class="memdesc:af3efe9a668e251175e5e199e99f9257d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disallow copying. <br /></td></tr>
<tr class="separator:af3efe9a668e251175e5e199e99f9257d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59dff09b6ab224e32a096c97b629d059"><td class="memItemLeft" align="right" valign="top"><a id="a59dff09b6ab224e32a096c97b629d059" name="a59dff09b6ab224e32a096c97b629d059"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>~Native_handle_sender</b> ()</td></tr>
<tr class="memdesc:a59dff09b6ab224e32a096c97b629d059"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys this peer endpoint which will end the conceptual outgoing-direction pipe (in PEER state, and if it's still active) and return resources to OS as applicable. <br /></td></tr>
<tr class="separator:a59dff09b6ab224e32a096c97b629d059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa739a0a76b4e0325c4067d5a5b55a802"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#aa739a0a76b4e0325c4067d5a5b55a802">operator=</a> (<a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&amp;src)</td></tr>
<tr class="memdesc:aa739a0a76b4e0325c4067d5a5b55a802"><td class="mdescLeft">&#160;</td><td class="mdescRight">Move-assigns from <code>src</code>; <code>*this</code> acts as if destructed; <code>src</code> becomes as-if default-cted (therefore in NULL state).  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#aa739a0a76b4e0325c4067d5a5b55a802">More...</a><br /></td></tr>
<tr class="separator:aa739a0a76b4e0325c4067d5a5b55a802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa67027b6f36ea618586cd24028f5025f"><td class="memItemLeft" align="right" valign="top"><a id="aa67027b6f36ea618586cd24028f5025f" name="aa67027b6f36ea618586cd24028f5025f"></a>
<a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;)=delete</td></tr>
<tr class="memdesc:aa67027b6f36ea618586cd24028f5025f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disallow copying. <br /></td></tr>
<tr class="separator:aa67027b6f36ea618586cd24028f5025f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe6227dfa077571d6eed2707532e4360"><td class="memTemplParams" colspan="2">template&lt;typename Create_ev_wait_hndl_func &gt; </td></tr>
<tr class="memitem:abe6227dfa077571d6eed2707532e4360"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#abe6227dfa077571d6eed2707532e4360">replace_event_wait_handles</a> (const Create_ev_wait_hndl_func &amp;create_ev_wait_hndl_func)</td></tr>
<tr class="memdesc:abe6227dfa077571d6eed2707532e4360"><td class="mdescLeft">&#160;</td><td class="mdescRight">To be (optionally) invoked before any <code>start_*_ops()</code>, supplies a factory for the <a class="el" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html" title="Useful if using the sync_io pattern within a user event loop built on boost.asio (optionally with flo...">util::sync_io::Asio_waitable_native_handle</a> objects pointers to which shall be subsequently passed into any <code>Event_wait_func</code> (as registered via <code>start_*_ops()</code>), when <code>*this</code> requires an async-wait on a particular native-handle.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#abe6227dfa077571d6eed2707532e4360">More...</a><br /></td></tr>
<tr class="separator:abe6227dfa077571d6eed2707532e4360"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c34b110850c736c45d88689ab06c27c"><td class="memTemplParams" colspan="2">template&lt;typename Event_wait_func_t &gt; </td></tr>
<tr class="memitem:a8c34b110850c736c45d88689ab06c27c"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c">start_send_native_handle_ops</a> (Event_wait_func_t &amp;&amp;ev_wait_func)</td></tr>
<tr class="memdesc:a8c34b110850c736c45d88689ab06c27c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets up the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern interaction between <code>*this</code> and the user's event loop; required before <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6" title="Equivalent to send_native_handle() but sends a graceful-close message instead of the usual payload; t...">async_end_sending()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c60142c23bf70bc3722d557ad309d58" title="Equivalent to async_end_sending(&amp;E, F) wherein F() does nothing, and E is some Error_code &quot;sink&quot; igno...">end_sending()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499" title="In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level message...">auto_ping()</a> will work (as opposed to no-op/return <code>false</code>).  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c">More...</a><br /></td></tr>
<tr class="separator:a8c34b110850c736c45d88689ab06c27c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afde03d7fb5746e77524229d5881b8d79"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#afde03d7fb5746e77524229d5881b8d79">send_meta_blob_max_size</a> () const</td></tr>
<tr class="memdesc:afde03d7fb5746e77524229d5881b8d79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#afde03d7fb5746e77524229d5881b8d79">More...</a><br /></td></tr>
<tr class="separator:afde03d7fb5746e77524229d5881b8d79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f8f3fb816c09dd9a992a878892bbffb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb">send_native_handle</a> (<a class="el" href="namespaceipc_1_1transport.html#a7ee4551983d9df16ec16a3139bac50e8">Native_handle</a> hndl_or_null, const <a class="el" href="namespaceipc_1_1util.html#ae0be7edba7e30ffa3f8b742af621f2ab">util::Blob_const</a> &amp;meta_blob, <a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> *err_code=0)</td></tr>
<tr class="memdesc:a0f8f3fb816c09dd9a992a878892bbffb"><td class="mdescLeft">&#160;</td><td class="mdescRight">In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order, to the opposing peer; the message consists of the provided native handle (if supplied); or the provided binary blob (if supplied); or both (if both supplied).  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb">More...</a><br /></td></tr>
<tr class="separator:a0f8f3fb816c09dd9a992a878892bbffb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b99e18949cf819bfae4e08e44744fc6"><td class="memTemplParams" colspan="2">template&lt;typename Task_err &gt; </td></tr>
<tr class="memitem:a9b99e18949cf819bfae4e08e44744fc6"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6">async_end_sending</a> (<a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> *sync_err_code, Task_err &amp;&amp;on_done_func)</td></tr>
<tr class="memdesc:a9b99e18949cf819bfae4e08e44744fc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a> but sends a graceful-close message instead of the usual payload; the opposing peer's paired <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">sync_io::Native_handle_receiver</a> or <a class="el" href="classipc_1_1transport_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order receivin...">transport::Native_handle_receiver</a> shall receive it reliably and in-order via <code>async_receive_native_handle()</code> in the form of <a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89" title="Short-hand for flow::Error_code which is very common.">Error_code</a> = <a class="el" href="namespaceipc_1_1transport_1_1error.html#adfef15ef4e76cc55d652fbd9c2797297aad44f87d53255ba573d57086dfeab805" title="Will not receive message: either opposing user sent graceful-close via API.">error::Code::S_RECEIVES_FINISHED_CANNOT_RECEIVE</a>.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6">More...</a><br /></td></tr>
<tr class="separator:a9b99e18949cf819bfae4e08e44744fc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c60142c23bf70bc3722d557ad309d58"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c60142c23bf70bc3722d557ad309d58">end_sending</a> ()</td></tr>
<tr class="memdesc:a8c60142c23bf70bc3722d557ad309d58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Equivalent to <code>async_end_sending(&amp;E, F)</code> wherein <code>F()</code> does nothing, and <code>E</code> is some <code>Error_code</code> "sink" ignored by the caller.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c60142c23bf70bc3722d557ad309d58">More...</a><br /></td></tr>
<tr class="separator:a8c60142c23bf70bc3722d557ad309d58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b90444b333091c3e44d01b8cb07a499"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499">auto_ping</a> (<a class="el" href="namespaceipc_1_1util.html#ac66141280c3b7295a86b65209f31cc58">util::Fine_duration</a> period=default_value)</td></tr>
<tr class="memdesc:a5b90444b333091c3e44d01b8cb07a499"><td class="mdescLeft">&#160;</td><td class="mdescRight">In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level messages that are ignored except that they reset any idle timer as enabled via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html#a57ec0f2a9c1b8bfbaaf88975433a1354" title="In PEER state: Irreversibly enables a conceptual idle timer whose potential side effect is,...">sync_io::Native_handle_receiver::idle_timer_run()</a> or <a class="el" href="classipc_1_1transport_1_1Native__handle__receiver.html#a174ee15818a8bda361bdc40f094faac9" title="In PEER state: Irreversibly enables a conceptual idle timer whose potential side effect is,...">transport::Native_handle_receiver::idle_timer_run()</a> (or similar).  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499">More...</a><br /></td></tr>
<tr class="separator:a5b90444b333091c3e44d01b8cb07a499"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a624a0c63efc9487cea6da342be38d9a7"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="namespaceipc_1_1transport.html#a33de1c256addb3964b839dc2dd407d24">Shared_name</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a624a0c63efc9487cea6da342be38d9a7">S_RESOURCE_TYPE_ID</a></td></tr>
<tr class="memdesc:a624a0c63efc9487cea6da342be38d9a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.  <a href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a624a0c63efc9487cea6da342be38d9a7">More...</a><br /></td></tr>
<tr class="separator:a624a0c63efc9487cea6da342be38d9a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >A documentation-only <em>concept</em> defining the behavior of an object that is the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern counterpart of the async-I/O-pattern-following concept of the same name in our parent namespace: <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </p>
<p >This is paired with the <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">sync_io::Native_handle_receiver</a> concept which defines reception of such messages.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a> &ndash; our async-I/O counterpart. </dd>
<dd>
<a class="el" href="namespaceipc_1_1util_1_1sync__io.html" title="Contains common code, as well as important explanatory documentation in the following text,...">util::sync_io</a> doc header &ndash; describes the general <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern we are following here.</dd></dl>
<h3>Concept contents</h3>
<p >The concept defines the following behaviors/requirements.</p><ul>
<li>The object has at least 2 states: Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</li>
<li>The (outgoing) transmission-of-messages methods, including transmission of graceful-close message. See their doc headers. Same signatures as <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a> methods but acting per <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern (synchronously).</li>
<li>Behavior when the destructor is invoked. See its doc header.</li>
<li>All ctors and move assignment: Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. Exception: no <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-core-adopting ctor (since we <em>are</em> that core).</li>
<li><code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern setup methods: <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#abe6227dfa077571d6eed2707532e4360" title="To be (optionally) invoked before any start_*_ops(), supplies a factory for the util::sync_io::Asio_w...">replace_event_wait_handles()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a>.</li>
</ul>
<p >The concept (intentionally) does <em>not</em> define the following behaviors:</p><ul>
<li>How to create a <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">Native_handle_sender</a>, except the default and move ctors. Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__socket__stream.html" title="Implements both sync_io::Native_handle_sender and sync_io::Native_handle_receiver concepts by using a...">sync_io::Native_socket_stream</a>: as of this writing one key class that implements this concept (and also <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">sync_io::Native_handle_receiver</a>) &ndash; using the Unix domain socket <a class="el" href="namespaceipc_1_1transport.html" title="Flow-IPC module providing transmission of structured messages and/or low-level blobs (and more) betwe...">transport</a>.</dd></dl>
<h3>Thread safety</h3>
<p >For a given <code>*this</code>, it is not required to be safe for a non-<code>const</code> operation to be invoked concurrently with another operation. That's typical. <em>In addition</em> &ndash; and this is significant &ndash; the following operation shall count as a "non-`const` operation" (as opposed to the usual definition which is simply non-<code>const</code> methods and related free functions):</p><ul>
<li><code>(*on_active_ev_func)()</code>, where <code>on_active_ev_func</code> is the so-named argument passed into an invocation of the <code>Event_wait_func</code> the user registers via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a>.</li>
</ul>
<p >Therefore: If you report an active event to <code>*this</code> (per <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern) from thread 1, and possibly call methods such as <code><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a></code> from thread 2, then you must use a mutex (or strand or ...) to prevent concurrent execution. For example: <a class="el" href="classipc_1_1transport_1_1Native__socket__stream.html" title="Implements both Native_handle_sender and Native_handle_receiver concepts by using a stream-oriented U...">transport::Native_socket_stream</a>, which internally operates a <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__socket__stream.html" title="Implements both sync_io::Native_handle_sender and sync_io::Native_handle_receiver concepts by using a...">sync_io::Native_socket_stream</a>, uses a send-ops mutex (<code>transport::Native_socket_stream::Impl::m_snd_mutex</code>).</p>
<h3>Rationale: Why is <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a> not asynchronous?</h3>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </p>

<p class="definition">Definition at line <a class="el" href="sync__io_2native__handle__transport_8hpp_source.html#l00073">73</a> of file <a class="el" href="sync__io_2native__handle__transport_8hpp_source.html">native_handle_transport.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a935bfba8ac18f395eb920224395cbc8f" name="a935bfba8ac18f395eb920224395cbc8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a935bfba8ac18f395eb920224395cbc8f">&#9670;&nbsp;</a></span>Native_handle_sender() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ipc::transport::sync_io::Native_handle_sender::Native_handle_sender </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default ctor: Creates a peer object in NULL (neither connected nor connecting) state. </p>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </p>

</div>
</div>
<a id="aa99ee4ded3b81cbaea9cb7aeac52a896" name="aa99ee4ded3b81cbaea9cb7aeac52a896"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa99ee4ded3b81cbaea9cb7aeac52a896">&#9670;&nbsp;</a></span>Native_handle_sender() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ipc::transport::sync_io::Native_handle_sender::Native_handle_sender </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move-constructs from <code>src</code>; <code>src</code> becomes as-if default-cted (therefore in NULL state). </p>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a9b99e18949cf819bfae4e08e44744fc6" name="a9b99e18949cf819bfae4e08e44744fc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b99e18949cf819bfae4e08e44744fc6">&#9670;&nbsp;</a></span>async_end_sending()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Task_err &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::async_end_sending </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> *&#160;</td>
          <td class="paramname"><em>sync_err_code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Task_err &amp;&amp;&#160;</td>
          <td class="paramname"><em>on_done_func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Equivalent to <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a> but sends a graceful-close message instead of the usual payload; the opposing peer's paired <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">sync_io::Native_handle_receiver</a> or <a class="el" href="classipc_1_1transport_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order receivin...">transport::Native_handle_receiver</a> shall receive it reliably and in-order via <code>async_receive_native_handle()</code> in the form of <a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89" title="Short-hand for flow::Error_code which is very common.">Error_code</a> = <a class="el" href="namespaceipc_1_1transport_1_1error.html#adfef15ef4e76cc55d652fbd9c2797297aad44f87d53255ba573d57086dfeab805" title="Will not receive message: either opposing user sent graceful-close via API.">error::Code::S_RECEIVES_FINISHED_CANNOT_RECEIVE</a>. </p>
<p >If invoked after already invoking <code>*end_sending()</code>, the method shall no-op and return <code>false</code> and neither an exception nor truthy <code>*err_code</code>. Otherwise it shall return <code>true</code> &ndash; but potentially emit a truthy <a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89" title="Short-hand for flow::Error_code which is very common.">Error_code</a> (if an error is detected).</p>
<p >Informally one should think of <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6" title="Equivalent to send_native_handle() but sends a graceful-close message instead of the usual payload; t...">async_end_sending()</a> as just another message, which is queued after preceding ones; but: it is the <em>last</em> message to be queued by definition. It's like an EOF or a TCP-FIN.</p>
<p >Per <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern: if internally more work is required asynchronously pending 1+ native handles being in 1+ active-event (readable, writable) state, this method shall later invoke the <code>Event_wait_func</code> registered via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> by the user of <code>*this</code>; and the error code <a class="el" href="namespaceipc_1_1transport_1_1error.html#adfef15ef4e76cc55d652fbd9c2797297aa667487757f9d6300f6888bac40bcc24" title="A sync_io operation could not immediately complete; it will complete contingent on active async-wait ...">error::Code::S_SYNC_IO_WOULD_BLOCK</a> shall be emitted here synchronously (via <code>*sync_err_code</code> if not null, exception if null &ndash; per standard <code>flow::Error_code</code>-doc-header semantics). Meanwhile the completion handler <code>on_done_func()</code> shall execute once the required async-waits have been satisfied by the <code>*this</code> user, synchronously from inside the <code>(*on_active_ev_func)()</code> call that achieves this state.</p>
<p >If, by contrast, no more work is required &ndash; the operation completed synchronously within this method &ndash; then: success or error <em>other than</em> error::code::S_SYNC_IO_WOULD_BLOB shall be emitted (again per standard semantics) synchronously, and <code>on_done_func()</code> shall not be saved nor ever executed by <code>*this</code>. Thus the result of the operation shall be either output directly synchronously &ndash; if op completed synchronously &ndash; or later via <code>on_done_func()</code> completion handler.</p>
<p >Informally:</p><ul>
<li>emission of <em>not</em> <code>S_SYNC_IO_WOULD_BLOCK</code> is analogous to <code>SSL_write()</code> <em>not</em> returning <code>SSL_ERROR_WANT_*</code>. The operation completed.</li>
<li>emission of <code>S_SYNC_IO_WOULD_BLOCK</code> is analogous to <code>SSL_write()</code> returning <code>SSL_ERROR_WANT_*</code>. The operation requires an underlying transport to reach a certain readable/writable state before <code>SSL_write()</code> can complete.</li>
</ul>
<p >In addition: if <code>*this</code> is not in PEER state (in particular if it is default-cted or moved-from), returns <code>false</code> immediately instead and otherwise no-ops (logging aside).</p>
<h3>Error semantics</h3>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. Exception: error may be emitted synchronously. Exception: <a class="el" href="namespaceipc_1_1transport_1_1error.html#adfef15ef4e76cc55d652fbd9c2797297afe29343445a7bf167cc186a44bd2c6ed" title="Async completion handler is being called prematurely, because underlying object is shutting down,...">error::Code::S_OBJECT_SHUTDOWN_ABORTED_COMPLETION_HANDLER</a> shall not be emitted.</p>
<h3>Thread safety</h3>
<p >The notes for <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a> apply.</p>
<p >The semantic re. calling <code>*end_sending()</code> after already having called it and having that exclusively return <code>false</code> and do nothing was a judgment call. As of this writing there's a long-ish comment at the top of of <code>"sync_io::Native_socket_stream::Impl::*end_sending()"</code>" body discussing why I (ygoldfel) went that way. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Task_err</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync_err_code</td><td>See above. Do realize <a class="el" href="namespaceipc_1_1transport_1_1error.html#adfef15ef4e76cc55d652fbd9c2797297aa667487757f9d6300f6888bac40bcc24" title="A sync_io operation could not immediately complete; it will complete contingent on active async-wait ...">error::Code::S_SYNC_IO_WOULD_BLOCK</a> <em>is</em> still an error, so if this pointer is null, then would-block <em>will</em> make this throw. </td></tr>
    <tr><td class="paramname">on_done_func</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. Plus see above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. In addition: return <code>false</code> if <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> has not been called successfully. </dd></dl>

</div>
</div>
<a id="a5b90444b333091c3e44d01b8cb07a499" name="a5b90444b333091c3e44d01b8cb07a499"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5b90444b333091c3e44d01b8cb07a499">&#9670;&nbsp;</a></span>auto_ping()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::auto_ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipc_1_1util.html#ac66141280c3b7295a86b65209f31cc58">util::Fine_duration</a>&#160;</td>
          <td class="paramname"><em>period</em> = <code>default_value</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level messages that are ignored except that they reset any idle timer as enabled via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html#a57ec0f2a9c1b8bfbaaf88975433a1354" title="In PEER state: Irreversibly enables a conceptual idle timer whose potential side effect is,...">sync_io::Native_handle_receiver::idle_timer_run()</a> or <a class="el" href="classipc_1_1transport_1_1Native__handle__receiver.html#a174ee15818a8bda361bdc40f094faac9" title="In PEER state: Irreversibly enables a conceptual idle timer whose potential side effect is,...">transport::Native_handle_receiver::idle_timer_run()</a> (or similar). </p>
<p >As to the behavior of auto-pings: Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<p >Per <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern: if internally more work is required asynchronously pending 1+ native handles being in 1+ active-event (readable, writable) state, this method shall synchronously invoke the <code>Event_wait_func</code> registered via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> by the user of <code>*this</code>.</p><ul>
<li>In <em>this</em> case the events waited-on are likely to be the periodic firing of an internal auto-ping timer. Therefore the correct auto-pinging behavior shall occur if and only if the user heeds the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern: async-wait when requested, report resulting events when they occur.</li>
</ul>
<p >If <code>*this</code> is not in PEER state (in particular if it is default-cted or moved-from), returns <code>false</code> immediately instead and otherwise no-ops (logging aside). If <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499" title="In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level message...">auto_ping()</a> has already been called successfuly, subsequently it will return <code>false</code> and no-op (logging aside). If <code>*end_sending()</code> has been called succesfully, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499" title="In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level message...">auto_ping()</a> will return <code>false</code> and no-op (logging side).</p>
<h3>Behavior past <code>*end_sending()</code></h3>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<h3>Thread safety</h3>
<p >The notes for <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a> apply.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">period</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. In addition: return <code>false</code> if <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> has not been called successfully. </dd></dl>

</div>
</div>
<a id="a8c60142c23bf70bc3722d557ad309d58" name="a8c60142c23bf70bc3722d557ad309d58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c60142c23bf70bc3722d557ad309d58">&#9670;&nbsp;</a></span>end_sending()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::end_sending </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Equivalent to <code>async_end_sending(&amp;E, F)</code> wherein <code>F()</code> does nothing, and <code>E</code> is some <code>Error_code</code> "sink" ignored by the caller. </p>
<p >Informally: ...Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>Same as in <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6" title="Equivalent to send_native_handle() but sends a graceful-close message instead of the usual payload; t...">async_end_sending()</a>. </dd></dl>

</div>
</div>
<a id="aa739a0a76b4e0325c4067d5a5b55a802" name="aa739a0a76b4e0325c4067d5a5b55a802"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa739a0a76b4e0325c4067d5a5b55a802">&#9670;&nbsp;</a></span>operator=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp; ipc::transport::sync_io::Native_handle_sender::operator= </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html">Native_handle_sender</a> &amp;&amp;&#160;</td>
          <td class="paramname"><em>src</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Move-assigns from <code>src</code>; <code>*this</code> acts as if destructed; <code>src</code> becomes as-if default-cted (therefore in NULL state). </p>
<p >No-op if <code>&amp;src == this</code>. Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>*this</code>. </dd></dl>

</div>
</div>
<a id="abe6227dfa077571d6eed2707532e4360" name="abe6227dfa077571d6eed2707532e4360"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe6227dfa077571d6eed2707532e4360">&#9670;&nbsp;</a></span>replace_event_wait_handles()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Create_ev_wait_hndl_func &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::replace_event_wait_handles </td>
          <td>(</td>
          <td class="paramtype">const Create_ev_wait_hndl_func &amp;&#160;</td>
          <td class="paramname"><em>create_ev_wait_hndl_func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>To be (optionally) invoked before any <code>start_*_ops()</code>, supplies a factory for the <a class="el" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html" title="Useful if using the sync_io pattern within a user event loop built on boost.asio (optionally with flo...">util::sync_io::Asio_waitable_native_handle</a> objects pointers to which shall be subsequently passed into any <code>Event_wait_func</code> (as registered via <code>start_*_ops()</code>), when <code>*this</code> requires an async-wait on a particular native-handle. </p>
<p >This is useful if the user event loop is built on boost.asio: the supplied factory function can associate the handle-object with the user's <code>Task_engine</code> (or strand or ...); hence when an async-wait is requested, the user can simply <code>hndl_of_interest-&gt;async_wait(..., F)</code>; <code>F()</code> will be invoked directly within the user's event loop.</p>
<p >(By contrast: if the user means to merely <code>poll(fd)</code> or <code>epoll_wait(fd)</code>, then they would simply do: <code>auto fd = hndl_of_interest-&gt;native_handle().m_native_handle</code>. In this case the associated execution context/executor of <code>*hndl_of_interest</code> is of zero import.)</p>
<p >This is a standard <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern API per <a class="el" href="namespaceipc_1_1util_1_1sync__io.html" title="Contains common code, as well as important explanatory documentation in the following text,...">util::sync_io</a> doc header.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Create_ev_wait_hndl_func</td><td>Function type matching signature <code><a class="el" href="classipc_1_1util_1_1sync__io_1_1Asio__waitable__native__handle.html" title="Useful if using the sync_io pattern within a user event loop built on boost.asio (optionally with flo...">util::sync_io::Asio_waitable_native_handle</a> F()</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">create_ev_wait_hndl_func</td><td>See above. Must return object <code>X</code> such that <code>X.is_open() == false</code> (i.e., storing no native handle/FD). </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>false</code> &ndash; indicating no-op, logging aside &ndash; if and only if <code>start_*_ops()</code> has been called already. <code>true</code> indicating success. Note that this method should succeed even in NULL state. </dd></dl>

</div>
</div>
<a id="afde03d7fb5746e77524229d5881b8d79" name="afde03d7fb5746e77524229d5881b8d79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afde03d7fb5746e77524229d5881b8d79">&#9670;&nbsp;</a></span>send_meta_blob_max_size()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t ipc::transport::sync_io::Native_handle_sender::send_meta_blob_max_size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>See above. </dd></dl>

</div>
</div>
<a id="a0f8f3fb816c09dd9a992a878892bbffb" name="a0f8f3fb816c09dd9a992a878892bbffb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f8f3fb816c09dd9a992a878892bbffb">&#9670;&nbsp;</a></span>send_native_handle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::send_native_handle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespaceipc_1_1transport.html#a7ee4551983d9df16ec16a3139bac50e8">Native_handle</a>&#160;</td>
          <td class="paramname"><em>hndl_or_null</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespaceipc_1_1util.html#ae0be7edba7e30ffa3f8b742af621f2ab">util::Blob_const</a> &amp;&#160;</td>
          <td class="paramname"><em>meta_blob</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceipc.html#aa3192e586cc45d3e7c22463bf2760f89">Error_code</a> *&#160;</td>
          <td class="paramname"><em>err_code</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order, to the opposing peer; the message consists of the provided native handle (if supplied); or the provided binary blob (if supplied); or both (if both supplied). </p>
<p >The opposing peer's paired <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">sync_io::Native_handle_receiver</a> or <a class="el" href="classipc_1_1transport_1_1Native__handle__receiver.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order receivin...">transport::Native_handle_receiver</a> shall receive it reliably and in-order via <code>async_receive_native_handle()</code>.</p>
<p >Per <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern: if internally more work is required asynchronously pending 1+ native handles being in 1+ active-event (readable, writable) state, this method shall synchronously invoke the <code>Event_wait_func</code> registered via <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> by the user of <code>*this</code>.</p>
<p >If <code>*this</code> is not in PEER state (in particular if it is default-cted or moved-from), returns <code>false</code> immediately instead and otherwise no-ops (logging aside).</p>
<p >Providing neither a handle nor a blob results in undefined behavior (assertion may trip). To <em>not</em> supply a handle, provide object with <code>.null() == true</code>. To <em>not</em> supply a blob, provide a buffer with <code>.size() == 0</code>.</p>
<h3>Blob copying behavior; synchronicity/blockingness guarantees</h3>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<h3>Error semantics</h3>
<p >Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>.</p>
<h3>Thread safety</h3>
<p >You may call this from any thread. It is <em>not</em> required to be safe to call concurrently with any <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object that is the sync_io-pattern counterpa...">Native_handle_sender</a> API, including this one and the destructor, invoked on <code>*this</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">hndl_or_null</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
    <tr><td class="paramname">meta_blob</td><td>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </td></tr>
    <tr><td class="paramname">err_code</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. In addition: return <code>false</code> if <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c34b110850c736c45d88689ab06c27c" title="Sets up the sync_io-pattern interaction between *this and the user&#39;s event loop; required before send...">start_send_native_handle_ops()</a> has not been called successfully. </dd></dl>

</div>
</div>
<a id="a8c34b110850c736c45d88689ab06c27c" name="a8c34b110850c736c45d88689ab06c27c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8c34b110850c736c45d88689ab06c27c">&#9670;&nbsp;</a></span>start_send_native_handle_ops()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Event_wait_func_t &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool ipc::transport::sync_io::Native_handle_sender::start_send_native_handle_ops </td>
          <td>(</td>
          <td class="paramtype">Event_wait_func_t &amp;&amp;&#160;</td>
          <td class="paramname"><em>ev_wait_func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets up the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern interaction between <code>*this</code> and the user's event loop; required before <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a0f8f3fb816c09dd9a992a878892bbffb" title="In PEER state: Synchronously, non-blockingly sends one discrete message, reliably/in-order,...">send_native_handle()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a9b99e18949cf819bfae4e08e44744fc6" title="Equivalent to send_native_handle() but sends a graceful-close message instead of the usual payload; t...">async_end_sending()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a8c60142c23bf70bc3722d557ad309d58" title="Equivalent to async_end_sending(&amp;E, F) wherein F() does nothing, and E is some Error_code &quot;sink&quot; igno...">end_sending()</a>, <a class="el" href="classipc_1_1transport_1_1sync__io_1_1Native__handle__sender.html#a5b90444b333091c3e44d01b8cb07a499" title="In PEER state: Irreversibly enables periodic auto-pinging of opposing receiver with low-level message...">auto_ping()</a> will work (as opposed to no-op/return <code>false</code>). </p>
<p ><code>ev_wait_func()</code> &ndash; with signature matching <a class="el" href="namespaceipc_1_1util_1_1sync__io.html#aa0b9a3cc6bdc7dedbef4f9e06851aa24" title="In sync_io pattern, concrete type storing user-supplied function invoked by pattern-implementing ipc:...">util::sync_io::Event_wait_func</a> &ndash; is a key function memorized by <code>*this</code>. It shall be invoked by <code>*this</code> operations when some op cannot complete synchronously and requires a certain event (readable/writable) to be active on a certain native-handle.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespaceipc_1_1util_1_1sync__io.html#aa0b9a3cc6bdc7dedbef4f9e06851aa24" title="In sync_io pattern, concrete type storing user-supplied function invoked by pattern-implementing ipc:...">util::sync_io::Event_wait_func</a> doc header for useful and complete instructions on how to write an <code>ev_wait_func()</code> properly. Doing so correctly is the crux of using the <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code> pattern.</dd></dl>
<p>This is a standard <code><a class="el" href="namespaceipc_1_1transport_1_1sync__io.html" title="sync_io-pattern counterparts to async-I/O-pattern object types in parent namespace ipc::transport.">sync_io</a></code>-pattern API per <a class="el" href="namespaceipc_1_1util_1_1sync__io.html" title="Contains common code, as well as important explanatory documentation in the following text,...">util::sync_io</a> doc header.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Event_wait_func_t</td><td>Function type matching <a class="el" href="namespaceipc_1_1util_1_1sync__io.html#aa0b9a3cc6bdc7dedbef4f9e06851aa24" title="In sync_io pattern, concrete type storing user-supplied function invoked by pattern-implementing ipc:...">util::sync_io::Event_wait_func</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ev_wait_func</td><td>See above. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>false</code> if this (or equivalent) has already been invoked; no-op logging aside. <code>true</code> otherwise. </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a624a0c63efc9487cea6da342be38d9a7" name="a624a0c63efc9487cea6da342be38d9a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a624a0c63efc9487cea6da342be38d9a7">&#9670;&nbsp;</a></span>S_RESOURCE_TYPE_ID</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespaceipc_1_1transport.html#a33de1c256addb3964b839dc2dd407d24">Shared_name</a> ipc::transport::sync_io::Native_handle_sender::S_RESOURCE_TYPE_ID</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Same notes as for <a class="el" href="classipc_1_1transport_1_1Native__handle__sender.html" title="A documentation-only concept defining the behavior of an object capable of reliably/in-order sending ...">transport::Native_handle_sender</a>. </p>

<p class="definition">Definition at line <a class="el" href="sync__io_2native__handle__transport_8hpp_source.html#l00079">79</a> of file <a class="el" href="sync__io_2native__handle__transport_8hpp_source.html">native_handle_transport.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>transport/sync_io/<a class="el" href="sync__io_2native__handle__transport_8hpp_source.html">native_handle_transport.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 11 2025 20:02:27 for Flow-IPC by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
